package com.tianhao.luo.nouse.use;

import com.tianhao.luo.nouse.constant.PlantRefence;
import com.tianhao.luo.nouse.factory.SimpleFactory;
import com.tianhao.luo.nouse.plant.Plant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Date 2019/12/9
 * @Author tianhao.luo
 * @Description
 */
public class Function {
    private static final Logger LOGGER = LoggerFactory.getLogger(Function.class);
    public void put(PlantRefence plantRefence, int number) {
        Plant plant = SimpleFactory.createPlant(plantRefence);
        LOGGER.info("将{}放在{}号地",plant.getName(),number);
        plant.fight(plant.getName());
    }
}
